<include  file='Public:header'/>
<div class="local">
    当前位置:  附件设置
</div>
<div class="action">
    <em>注意：</em>这里是控制全局缩略图大小等设置的
</div>
<div class="listBox clfx">              
    <div class="cl"></div>
    <div class="menuManage">
        <form  target="simpleO2O_frm" action="{:U('setting/attachs')}" method="post">
            <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td align="right">水印图片:</td>
                    <td>
                        <div style="width: 300px; height: 100px; float: left;">
                            <input type="hidden" name="data[water]" value="{$CONFIG.attachs.water}" id="data_photo" />
                            <input id="photo_file" name="photo_file" type="file" multiple="true" value="" />
                        </div>
                        <div style="width: 300px; height: 100px; float: left;">
                            <img id="photo_img" width="100" height="80"  src="{$CONFIG.attachs.water|default='default.jpg'}" />
                        </div>
                <js file='__PUBLIC__/js/uploadify/jquery.uploadify.min.js'/>
                <link rel="stylesheet" href="__PUBLIC__/js/uploadify/uploadify.css">
                <script>
                        $("#photo_file").uploadify({
                            'swf'      : '__PUBLIC__/js/uploadify/uploadify.swf?t={$nowtime}',
                            'uploader' : '{:U("Attachment/uploadFile",array("model"=>"setting"))}',
                            'cancelImg' : '__PUBLIC__/js/uploadify/uploadify-cancel.png',
                            'buttonText' : '设置水印图片',
                            'fileTypeExts': '*.gif;*.jpg;*.png',
                            'queueSizeLimit':1,
                            'onUploadSuccess' : function(file, data, response) {
                                $("#data_photo").val(data);
                                $("#photo_img").attr('src',''+data).show();
                            }
                        });
             
                </script>
                </td>
                </tr>

                <tr>
                    <td align="right">文章缩略图：</td>
                    <td>
                        <input type="text" name="data[article][thumb]" value="{$CONFIG.attachs.article.thumb}" class="manageInput w100" /> 
                    </td>
                </tr>
                <tr>
                    <td align="right">用户头像：</td>
                    <td>
                        大图<input type="text" name="data[user][thumb][thumb]" value="{$CONFIG.attachs.user.thumb.thumb}" class="manageInput w100" /> 
                        中图<input type="text" name="data[user][thumb][middle]" value="{$CONFIG.attachs.user.thumb.middle}" class="manageInput w100" /> 
                        小图<input type="text" name="data[user][thumb][small]" value="{$CONFIG.attachs.user.thumb.small}" class="manageInput w100" /> 
                    </td>
                </tr>
                <tr>
                    <td align="right">编辑器大图：</td>
                    <td>
                        <input type="text" name="data[editor][thumb]" value="{$CONFIG.attachs.editor.thumb}" class="manageInput w100" /> 
                        <label>
                            <input type="checkbox" name="data[editor][water]" value="1"  <eq name="CONFIG.attachs.editor.water" value="1">checked="checked"</eq> /> 
                            启用水印
                        </label>
                        <code>水印只能作用于大于某个条件的图，一般水印只会加在最大的图上面</code>
                    </td>
                </tr>
                <tr>
                    <td align="right"></td>
                    <td>
                        <input type="submit" class="remberSubmit" value="确认保存"  />
                    </td>
                </tr>
            </table>
        </form>
    </div>
    <include  file='Public:footer'/>       